<template>
  <div class="modal-body-wrapper">
    <div class="fanta-table-title">
      注册信息
    </div>
    <table class="fanta-table">
      <tr>
        <td class="fanta-td-label fanta-td-15" >授权单位</td>
        <td class="fanta-td-label fanta-td-35" >{{ licenseInfo.copyRightAg }}</td>
      </tr>
      <tr>
        <td class="fanta-td-label fanta-td-15" >MAC地址</td>
        <td class="fanta-td-label fanta-td-35" >{{ licenseInfo.mac ? licenseInfo.mac : '-' }}</td>
      </tr>
      <!-- <tr>
        <td class="fanta-td-label fanta-td-15" >申请产品</td>
        <td class="fanta-td-label fanta-td-35" ></td>
      </tr> -->
      <tr>
        <td class="fanta-td-label fanta-td-15" >有效日期</td>
        <td class="fanta-td-label fanta-td-35" >{{ licenseInfo.endtime }}</td>
      </tr>
      <!-- <tr>
        <td class="fanta-td-label fanta-td-15" >菜单授权码</td>
        <td class="fanta-td-label fanta-td-35" ></td>
      </tr> -->
      <tr>
        <td class="fanta-td-label fanta-td-15" >备案文件</td>
        <td class="fanta-td-label fanta-td-35" >{{ licenseInfo.path }}</td>
      </tr>
      <tr>
        <td class="fanta-td-label fanta-td-15" >备案信息</td>
        <td class="fanta-td-label fanta-td-35" >{{ licenseInfo.licenseInfo }}</td>
      </tr>
    </table>
  </div>
</template>

<script setup>
import XEUtils from 'xe-utils'
import { onMounted, ref } from 'vue'
import { NextLoading } from '/@/utils/loading';
import { useSettingStore } from '@/stores/modules'

// 信息对象定义
const licenseInfo = ref({
  day: null,
	mac: null,
	path: "",
	endtime: "",
	message: "",
  copeRightag: null,
	showMessage: false,
})

const loadMessage = async () => {
  try {
    const info = await useSettingStore().setLicenseInfo()
    console.log('loadMessage', info)
    if (info) { licenseInfo.value = info }
  } catch (err) {
    console.log('loadMessage', err)
  }
}

// 页面加载时
onMounted(() => {
	NextLoading.done();
});

loadMessage()

</script>

<style lang="scss" scoped>
.modal-body-wrapper {
  width: 50%;
  margin: 0 auto;
  padding: 20px;
}
.fanta-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  td {
    border: 1px solid #9C9C9C;
    padding: 5px;
    font-size: 1.2rem;
    word-break: break-all;
  }
  .fanta-td-15 {
    text-align: left;
    width: 14%;
  }
  .fanta-td-35 {
    text-align: left;
    width: 36%;
  }
	.fanta-textarea {
		min-height: 50px;
		word-break: break-all;
	}
	.text-left {
		text-align: left;
	}
}
.fanta-table-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  vertical-align: middle !important;
  height: 40px;
  word-break: break-all;
  margin-top: 20px;
  margin-bottom: 20px;
}
.fanta-table-toolbar {
  display: flex;
  margin-bottom: 5px;
.fanta-table-toolbar-right {
    margin-left: auto;
    display: flex;
    .serach-time {
      font-size: 1rem;
    }
  }
}
.fanta-vertical-top {
  vertical-align: top !important;
}
</style>